#ifndef _PROTECT_H_
#define _PROTECT_H_
#include "BMS_Config.h"
#include "BQ76920.H"
#include "monitor.h"
#include "BMS_Mode.h"
#include "my_task.h"
#include "FreeRTOS.h"
//报警
typedef enum{
    FlAG_ALERT_NO	= 0x0000,//无报警触发
    FlAG_ALERT_OV	= 0X0001,//充电过压保护触发位
    FlAG_ALERT_UV	= 0X0002,//放电欠压
    FlAG_ALERT_OCC	= 0X0004,//充电过流
    FlAG_ALERT_OCD	= 0X0008,//放电过流
    FlAG_ALERT_SCD	= 0X0010,//放电短路
    FlAG_ALERT_OTC	= 0X0020,//充电过温
    FlAG_ALERT_OTD	= 0X0040,//放电过温
    FlAG_ALERT_LTC	= 0X0080,//充电低温
    FlAG_ALERT_LTD	= 0X0100,//放电低温
    
}BMS_Alert_flag_Typedef;

typedef enum{
    Protect_state_monitor,//监控状态
    Protect_state_relieve_wait,//等待或监控恢复条件
    Protect_state_relieve,//执行恢复
}BMS_Protect_Typedef;

void BMS_protect(void *pvParameters);

#endif